﻿using DTM.Core.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DTM.WinApp
{
    internal abstract class Presenter<T>
    {
        protected T View { get; private set; }

        /// <summary>
        /// Initialize presenter with view.
        /// </summary>
        /// <param name="view">View of the presenter.</param>
        public void Initialize(T view)
        {
            Validate.NotNull<ArgumentNullException>(view, "view");
            View = view;
            InitalizeView();
        }

        /// <summary>
        /// Initialize view.
        /// </summary>
        protected abstract void InitalizeView();
    }
}